package edu.neusoft.yuejian_09.service;

import java.util.List;

import edu.neusoft.yuejian_09.bean.Master;
import edu.neusoft.yuejian_09.bean.Question;
import edu.neusoft.yuejian_09.bean.Train;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by 爽 on 2017/10/9.
 */

public interface MasterService {
    //大师列表接口
    @GET("Master/getMasters")
    Call<List<Master>> getAllMasters();

    //大师详情接口
    @GET("Master/getMasterInfo")
    Call<Master> getMasterById(
            @Query("master_id") int master_id
    );

    //大师课堂接口
    @GET("Master/getMasterTrains")
    Call<List<Train>> getMasterTrains(
            @Query("master_id") int master_id
    );
    //大师问答接口
    @GET("Master/getMasterQA")
    Call<List<Question>> getMasterQA(
            @Query("master_id") int master_id
    );

    //搜索大师
    @GET("Master/searchMaster")
    Call<List<Master>> getMasterBySearch(
            @Query("search") String search
    );

    //发布问题
    @GET("Master/insertQuestion")
    Call<Question> insertNote(
            @Query("user_id") int user_id,
            @Query("master_id") int master_id,
            @Query("qa_question") String qa_question
    );

}
